#ifndef QRESETWIDGET_H
#define QRESETWIDGET_H

#include <QWidget>
#include <QToolButton>

class QProperty;

class QResetWidget : public QWidget
{
    Q_OBJECT
    Q_PROPERTY(QString m_text READ text WRITE setText USER true)
public:
    explicit QResetWidget(QProperty *pro,QWidget *parent = 0);

    void    setWidget(QWidget* wid);

    void    enabledButton(bool enable);

    QString text();
    void    setText(const QString text);

    void    setReset(bool b);
protected:
    void    paintEvent(QPaintEvent *);
signals:

public slots:
    void    propertyChanged();
    void    reset();
protected:
    QToolButton *m_resetButton;
    QProperty   *m_property;
    QString     m_text;
};

#endif // QRESETWIDGET_H
